package com.kinyx.framework.reflect;

import java.util.HashMap;
import java.util.Map;

import org.junit.Test;

public class KBeanUtils_Tester_copyProperties2 extends KBeanUtils_Tester_copyProperties_SUPER {

	@Test
	public void testA_null() {
		final A from = new A();
		this.checkNull(from);

		final Map<String, Object> to = new HashMap<>();
		KBeanUtils.copyProperties(from, to);
		this.checkNull(to);
	}

	@Test
	public void testA() {
		final A from = new A();
		this.init(from);
		this.check(from);

		final Map<String, Object> to = new HashMap<>();
		KBeanUtils.copyProperties(from, to);
		this.checkA(to);
	}

	@Test
	public void testB_null() {
		final B from = new B();
		this.checkNull(from);

		final Map<String, Object> to = new HashMap<>();
		KBeanUtils.copyProperties(from, to);
		this.checkNull(to);
	}

	@Test
	public void testB() {
		final B from = new B();
		this.init(from);
		this.check(from);

		final Map<String, Object> to = new HashMap<>();
		KBeanUtils.copyProperties(from, to);
		this.checkB(to);
	}

}
